xl: Fix assertion on domain reboot with new configuration
authorFatih Acar <fatih.acar@gandi.net>
Mon, 30 Jan 2017 14:33:18 +0000 (15:33 +0100)
committerWei Liu <wei.liu2@citrix.com>
Thu, 2 Feb 2017 12:33:08 +0000 (12:33 +0000)
commitdd75ed5c14704862b547412086cde5dcc671997e
tree16d4fea766af32c9c2e54c04f6282b66f8882974
parentdf58461e6b6dfa85ea208fbe511a96cd5c8d61d3
xl: Fix assertion on domain reboot with new configuration

libxl_domain_build_info_dispose is not resetting the type field to LIBXL_DOMAIN_TYPE_INVALID.
Instead, it is memseting the struct to 0 thus when libxl_domain_build_info_init_type is called
after a dispose on the same struct, an assertion is triggered because type != LIBXL_DOMAIN_TYPE_INVALID.
Calling libxl_domain_build_info_init makes sure the type field is correctly initialized.

Signed-off-by: Fatih Acar <fatih.acar@gandi.net>
Signed-off-by: Nikita Kozlov <nikita.kozlov@gandi.net>
Signed-off-by: Vincent Legout <vincent.legout@gandi.net>
Signed-off-by: Baptiste Daroussin <baptiste.daroussin@gandi.net>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/xl_cmdimpl.c